#ifndef LS_AvDecoder_H
#define LS_AvDecoder_H

#include <functional>
#include "common.h"

struct Package;

class AvDecoder
{
private:
   const char * m_file_path;
public:
    AvDecoder(const char *path):m_file_path(path) {};
    ~AvDecoder() {};

    typedef std::function<void(Package &&)> decode_callback;

    /**
     * @brief 开启解析
     * */ 
    int run(bool loop, decode_callback callback);

    int shutdown();
};

#endif